package com.cloudlead.common.worker.security;

import com.cloudlead.common.lang.security.Subject;

public interface TokenInfoService {
    String ACCESS_TOKEN_CACHE = "security_accessToken_";

    String USERNAME_ACCESS_TOKEN_CACHE = "security_username_accessToken_";

	/**
	 * 根据token获取用户信息
	 * 
	 * @param accessToken
	 * @return
	 */
	Subject getSubjectByAccessToken(String accessToken);

	/**
	 * 根据权限信息获取token
	 * 
	 * @param username
	 * @return
	 */
	String getAccessTokenByUser(String username);
}
